home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gwu / adaed / math / read.me < prev   
Encoding:
Text File  |  1996-01-30  |  3.4 KB  |  73 lines

  1. Ada Portable Simple Math Library
  2.  
  3. Michael B. Feldman
  4. Department of Electrical Engineering and Computer Science
  5. The George Washington University
  6. Washington, DC 20052
  7. (202) 994-5253 (voice)
  8. (202) 994-5296 (fax)
  9. mfeldman@seas.gwu.edu (Internet)
  10.  
  11. This is a moderately simplified version of the Ada packages for primitive
  12. and transcendental math functions developed by the Numerics Rapporteur
  13. Group of the International Standards Organization (ISO) Working Group
  14. on Ada. The packages in this form were written by Vincent Broman in 1990;
  15. see the comments in the source files for copyright and distribution
  16. conditions.  
  17.  
  18. In plain English, you may use, modify, and redistribute these packages
  19. as long as you continue to redistribute the source code and do not
  20. put any additional restrictions on distribution. 
  21.  
  22. I simplified Broman's packages to make them compatible with all Ada 
  23. compilers including NYU Ada/Ed. The latter compiler does not support
  24. double-precision floating point. The Broman packages are generic; 
  25. these packages remove the genericity and are specific to the predefined
  26. type Float. This simplication is intended to make the math library easy 
  27. to compile and use in educational situations where no use is made of 
  28. programmer-defined numeric types. 
  29.  
  30. I am distributing these packages primarily for educational purposes,
  31. and make no claims that they are industrial-strength or suitable for use
  32. in any other environment or for any other purposes.
  33.  
  34. Studying the source code for these packages reveals the complexities
  35. of writing portable numerics libraries. 
  36.  
  37. Compile the files in the following order:
  38.  
  39. constant.ads           -- a good collection of standard math constants
  40.                        -- which can be with-ed by programs needing
  41.                        -- definitions of Pi, e, and so forth
  42.  
  43. exceptio.ads           -- a package exporting Argument_Error. This
  44.                        -- package should not need to be with-ed, as
  45.                        -- the exception is re-exported by other
  46.                        -- packages
  47.  
  48. primfunc.ads           -- a collection of primitive math functions
  49.                        -- for retrieving the exponent and mantissa
  50.                        -- of floating-point values, truncation, etc.
  51.                        -- These may not be very efficient, because
  52.                        -- they do not depend on the availability
  53.                        -- of underlying representation information.
  54.                        -- This package should not normally be with-ed
  55.                        -- unless its functions are needed by the client.
  56.  
  57. primfunc.adb           -- Body of the primitive functions package.
  58.  
  59. math.ads               -- This is the actual math functions package,
  60.                        -- and will be the one normally with-ed by clients.
  61.                        -- It contains all the usual transcendental
  62.                        -- functions, square root, trig functions, etc.
  63.  
  64. math.adb               -- Body of the math library.
  65.  
  66. Once these files are compiled, clients should include the context clause
  67. WITH Math to gain access to the math functions. To get the constants, 
  68. use the context clause WITH Math_Constants.
  69.  
  70. NOTE: The bodies for Primitive_Functions and Math are LONG. Expect
  71. them to take a while to compile, especially using Ada/Ed. Be patient - 
  72. you only have to compile them once!
  73.